﻿using Microsoft.CodeAnalysis;

namespace UIOC.CodeAnalysis.Diagnostics;

internal static class InterfaceNamingDiagnostic {

    public const string DiagnosticId = "UIOC0001";

    private const string Title = "接口命名分析";
    private const string MessageFormat = "接口 '{0}' 的名称未以 'I' 开头";
    private const string Description = "接口名称应遵循以 'I' 开头的命名约定。";
    private const string Category = "CodeStyle";

    public static readonly DiagnosticDescriptor Rule = new(
        DiagnosticId,
        Title,
        MessageFormat,
        Category,
        DiagnosticSeverity.Error,
        isEnabledByDefault: true,
        description: Description
    );
}